<?php
use think\Route;
//http://www.vendorshop.com/api/v1.Banner/getBanner?id=1
Route::get('api/:version/banner/:id','api/:version.Banner/getBanner');

Route::get('api/:version/theme','api/:version.Theme/getSimpleList');

Route::get('api/:version/theme/:id','api/:version.Theme/getComplexOne');


Route::get('api/:version/product/by_category','api/:version.Product/getAllInCategory');
Route::get('api/:version/product/:id','api/:version.Product/getOne',[],['id'=>'\d+']);
Route::get('api/:version/product/recent','api/:version.Product/getRecent');

Route::get('api/:version/category/all','api/:version.Category/getAllCategories');

Route::post('api/:version/token/user','api/:version.Token/getToken');
//Route::post('api/:version/token/user','api/:version.Token/getUserPrimary');

//存储用户的分数和文理信息
Route::post('api/:version/user/score','api/:version.User/setScore');

Route::post('api/:version/address','api/:version.Address/createOrUpdateAddress');

Route::post('api/:version/order','api/:version.Order/placeOrder');
//订单详情
Route::post('api/:version/order/:id','api/:version.Order/getDetail',[],['id'=>'\d+']);

Route::post('api/:version/order/by_user','api/:version.Order/getSummaryByUser');

Route::post('api/:version/pay/pre_order', 'api/:version.Pay/getPreOrder');

Route::post('api/:version/pay/notify', 'api/:version.Pay/receiveNotify');
Route::post('api/:version/pay/re_notify', 'api/:version.Pay/redirectNotify');

//问答模块
//提问
Route::post('api/:version/question','api/:version.Question/SetQuestion');
//得到问题信息
Route::get('api/:version/get_question/:page','api/:version.Question/getQuestion');
//新增回答信息
Route::post('api/:version/answer/:id','api/:version.Answer/answerQuestion');
//根据问题id获得回答信息
Route::get('api/:version/get_answer/:id','api/:version.Answer/getAnswerByQid');

//专业大全
Route::get('api/:version/professional','api/:version.Professional/getDataByHtml');

Route::resource('blogs','index/blog');


//微信支付接口高考志愿军
Route::post('api/:version/wxpay/pre_order', 'api/:version.WXPay/getPreOrder');
//微信支付成功设置用户为vip
Route::post('api/:version/vip','api/:version.Token/setVip');